<?php

class indexAction extends Action
{

    public function _init()
    {
        $this->assign('action', $_GET['TMAC_ACTION']);
        $this->tmp_model = Tmac::model('index');
        $this->globals_model = Tmac::model('globals');

        $this->assign('cfg_webname', $GLOBALS['cfg_webname']);
        $this->assign('cfg_keywords', $GLOBALS['cfg_keywords']);
        $this->assign('cfg_description', $GLOBALS['cfg_description']);
        $this->assign('cfg_powerby', $this->HD($GLOBALS['cfg_powerby']));
        $this->assign('cfg_indexurl', $GLOBALS['cfg_indexurl']);
        $this->assign('picurl', $GLOBALS['TmacConfig']['config']['picurl']);
        $this->assign('ZNpicurl', $GLOBALS['TmacConfig']['config']['ZNpicurl']);
    }

    public function index()
    {
        $category = $this->tmp_model->getCategory();
        $recommend = $this->tmp_model->getRecommend();
        $rs = $this->tmp_model->getFlink(1);    //B2C商城
        $btob = $this->tmp_model->getFlink(2, 'btob');    //B2B商城
        $ctoc = $this->tmp_model->getFlink(3, 'ctoc');    //c2C店铺
//        print_r($rs);
        $this->V();
    }

    public function test()
    {
        $this->V('class');
    }

}